-
Notifications
You must be signed in to change notification settings - Fork 64
[WIP] SDL2 thread proxying fixes #127
base: master
Are you sure you want to change the base?
Conversation
This isn't actually WIP, but it does require emscripten-core/emscripten#9336 to land before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two that use the new APIs are definitely a nice cleanup. Might want to change the identical commit messages on the two mouse ones ("cursor creation"/"cursor setting"?), that confused me for a bit.
Not sure if there's a reason this doesn't just use MAIN_THREAD_EM_ASM*
everywhere? (Haven't done anything with threads yet.)
@@ -209,7 +233,7 @@ Emscripten_ShowCursor(SDL_Cursor* cursor) | |||
curdata = (Emscripten_CursorData *) cursor->driverdata; | |||
|
|||
if(curdata->system_cursor) { | |||
EM_ASM_INT({ | |||
MAIN_THREAD_EM_ASM_INT({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch this to MAIN_THREAD_EM_ASM
and drop the return. (I think EM_ASM
was less flexible when this was written.)
hot_y, | ||
conv_surf->pixels | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly annoying that we have to proxy this as it just wants to create an image from some data... But I don't think it can be avoided.
You might want to add |
This PR uses new APIs added in emscripten-core/emscripten#9336 to improve compatibility with
USE_PTHREADS=1
.